<HTML>
<HEAD>

<TITLE>Master Server</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD>
<link href="RaknetManual.css" rel="stylesheet" type="text/css">
<meta name="title" content="RakNet - Advanced multiplayer game networking API">
</HEAD>
<BODY BGCOLOR="#ffffff" LINK="#003399" vlink="#003399" alink="#003399" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"">
<img src="RakNetLogo.jpg" alt="Oculus VR, Inc."><BR><BR>

<table width="100%" border="0"><tr><td bgcolor="#6699CC">
<img src="spacer.gif" width="8" height="1">Master Server</td></tr></table>
<TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
<B>Deprecated, see <A HREF="http://masterserver2.raknet.com/">Master Server 2</A></B>
Description of the provided master server
<BR><BR>

A master game server is a server that maintains a list of running game servers.  It provides the same functionality as Gamespy minus the limited sorting features they provide but for thousands of $$$ less.  It's almost required these days because otherwise your players have no way to find other active games to connect to.<BR>
<BR>
This is the sample implementation of a master game server using RakNet.  There are many features you may wish to add on your own as this is just a shell.<BR>
<BR>
The code is class-based, one class for the master server and another for the master client, which your game should use to talk to the master server.  To include this functionality, just make one instantiation of MasterServer or MasterClient as appropriate.<BR>
<BR>
MasterServer will generally be a console application or a simple windowed application.  To run it, just call Initialize once, then Update once per frame.  You can also derive and implement OnModifiedPacket if you want.  MasterServerMain contains test code which is an excellent overview of the master server's capabilities.  It's a good idea to host this on a domain name rather than a specific IP so you can change servers without forcing your players to update.  For example, if your game's website is mutantkillerfrogs.com you can code the MasterClient to connect to this domain, which will be resolved to an IP.<BR>
<BR>
MasterClient is a client that game servers should include and manage.  It would be a good idea to connect to a domain name rather than a specific IP (see above)<BR>
<BR>
See <B>MasterClient.h</B>, <B>MasterServer.h</B>, and <B>MasterCommon.h</B> for full details on what the master server and master client can do.
<BR>

</TD></TR></TABLE>
<table width="100%" border="0"><tr><td bgcolor="#6699CC">
<img src="spacer.gif" width="8" height="1">See Also</td></tr></table>
<TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>

<A HREF="index.html">Index</A><BR>
<A HREF="natpunchthrough.html">NAT Punch-through</A><BR>

</TD></TR></TABLE>
</BODY>
</HTML>
